#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[]) {
  // printf("Hello World\n");
  int num;
  int *arr;
  // int *arr2 = NULL;
  if (argc != 2) {
    fprintf(stderr, "Usage: %s <num>\n", argv[0]);
    return 1;
  }
  if (sscanf(argv[1], "%d", &num) != 1) {
    fprintf(stderr, "Invalid input\n");
    fprintf(stderr, "Usage: %s <num>\n", argv[0]);
    return 1;
  }
  if (num <= 0) {
    fprintf(stderr, "please enter a positive number\n");
    return 1;
  }
  arr = (int *)malloc(num * sizeof(int));
  if (arr == NULL) {
    fprintf(stderr, "Memory allocation failed\n");
    return 1;
  }
  int man, index;
  memset(arr, 0, num * sizeof(int));
  for (man = 1; man < num; man++) {
    for (index = 1; man * index < num; index++) {
      arr[man * index] = 1 - arr[man * index];
    }
  }
  for (index = 1; index < num; index++) {
    if (arr[index])
      printf("%d\n", index);
  }
  free(arr);

  return 0;
}
